package com.xuzhen.annotation.impl;

import com.xuzhen.annotation.interfaces.MyAnnotation;

/**
* Annotation测试
* @author archie2010
* since 2011-3-17 下午03:34:56
*/
public class TestAnnotation {

	public static void main(String[] args) throws Throwable {
		//MyAnnotation myAnnotation=new Person().getClass().getMethod("add").getAnnotation(MyAnnotation.class);
		
		//获得有参方法Method时需要不定向参数Clazz...
		MyAnnotation myAnnotation=new Person().getClass().getMethod("add",Integer.class).
		getAnnotation(MyAnnotation.class);
		
		System.out.println(myAnnotation.desc1());
		System.out.println(myAnnotation.desc2());
		
		
		System.out.println(Integer.class.toString());
		System.out.println(Long.class.toString());
		if(Integer.class.toString().equals("class java.lang.Integer")){
			System.out.println("------相等");
		}
	}
}
